package com.design.pattern.create.factory.abstractFactory;

import com.design.pattern.entry.Bag;
import com.design.pattern.entry.Fruit;

/**
 * 抽象工厂测试
 *
 * @author gyf
 * @create 2018-11-30 18:45
 **/
public class AbstractFacoryTest {
    public static void main(String[] args) {
        AbstractFactory appleFactory = new AppleFactory();
        Bag bag = appleFactory.getBag();
        Fruit fruit = appleFactory.getFruit();
        fruit.draw();
        bag.pack();
    }
}
